// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * DownloadableSample generated by hbm2java
 */
@Entity
@Table(name = "downloadable_sample", catalog = "magento")
public class DownloadableSample implements java.io.Serializable {

	private Integer sampleId;
	private CatalogProductEntity catalogProductEntity;
	private String sampleUrl;
	private String sampleFile;
	private String sampleType;
	private int sortOrder;
	private Set downloadableSampleTitles = new HashSet(0);

	public DownloadableSample() {
	}

	public DownloadableSample(CatalogProductEntity catalogProductEntity,
			int sortOrder) {
		this.catalogProductEntity = catalogProductEntity;
		this.sortOrder = sortOrder;
	}

	public DownloadableSample(CatalogProductEntity catalogProductEntity,
			String sampleUrl, String sampleFile, String sampleType,
			int sortOrder, Set downloadableSampleTitles) {
		this.catalogProductEntity = catalogProductEntity;
		this.sampleUrl = sampleUrl;
		this.sampleFile = sampleFile;
		this.sampleType = sampleType;
		this.sortOrder = sortOrder;
		this.downloadableSampleTitles = downloadableSampleTitles;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "sample_id", unique = true, nullable = false)
	public Integer getSampleId() {
		return this.sampleId;
	}

	public void setSampleId(Integer sampleId) {
		this.sampleId = sampleId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "sample_url")
	public String getSampleUrl() {
		return this.sampleUrl;
	}

	public void setSampleUrl(String sampleUrl) {
		this.sampleUrl = sampleUrl;
	}

	@Column(name = "sample_file")
	public String getSampleFile() {
		return this.sampleFile;
	}

	public void setSampleFile(String sampleFile) {
		this.sampleFile = sampleFile;
	}

	@Column(name = "sample_type", length = 20)
	public String getSampleType() {
		return this.sampleType;
	}

	public void setSampleType(String sampleType) {
		this.sampleType = sampleType;
	}

	@Column(name = "sort_order", nullable = false)
	public int getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(int sortOrder) {
		this.sortOrder = sortOrder;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "downloadableSample")
	public Set getDownloadableSampleTitles() {
		return this.downloadableSampleTitles;
	}

	public void setDownloadableSampleTitles(Set downloadableSampleTitles) {
		this.downloadableSampleTitles = downloadableSampleTitles;
	}

}
